<?php


namespace App\Http\Api\Controllers;

use App\Models\CoUser;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;
class TasksControllers extends BaseController
{
    /**
     * 定时任务执行取消次数清0
     */
    public function tasks(Request $request){
        $ip = $request->getClientIp();
//        if($ip =='127.0.0.1'){
            CoUser::where('is_type',1)->update(['order_num'=>0]);
//        }
    }

    /**
     * 定时任务执行取消次数清0
     */
    public function num_order(Request $request){
        $ip = $request->getClientIp();
//        if($ip =='127.0.0.1'){
            CoUser::where('is_type',1)->update(['reward_num'=>0]);
//        }
    }
}
